import { defineStore } from "pinia"

export const UseLocation = defineStore({
    id: 'Location',
    state: () => ({
        LocationIndex: 0,
        locationArr: [
            { code: 'ALL', name: '全部' },
            { code: 'LOCATION_01', name: '01区' },
            { code: 'LOCATION_02', name: '02区' },
            // { code: 'LOCATION_03', name: '02区' },
            // { code: 'LOCATION_04', name: '02区' },
            // { code: 'LOCATION_01', name: '01区' },
            // { code: 'LOCATION_02', name: '02区' },
            // { code: 'LOCATION_03', name: '03区' },
        ],

    }),
    actions: {
        async SetLocationIndex(LocationIndex: any) {
            this.$patch({
                LocationIndex: LocationIndex,
            });
        },
    },
})